<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
		<meta http-equiv="description" content="This is my page" />

		<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
		
		<script language="JavaScript" src="<%=path %>/js/public.js" type="text/javascript"></script>
		
        <script language="javascript">
           function musicDel(musicId)
           {
               if(confirm('您确定删除吗？'))
               {
                   window.location.href="<%=path %>/musicDel.action?musicId="+musicId;
               }
           }


           function musicVip(musicId)
           {
            
                   window.location.href="<%=path %>/musicVip.action?musicId="+musicId;
               
           }

           function musicCancelVip(musicId)
           {
            
                   window.location.href="<%=path %>/musicCancelVip.action?musicId="+musicId;
               
           }
           
           
           
           function musicAdd()
           {
                 var url="<%=path %>/tomusicAdd.action";
                 //var n="";
                 //var w="480px";
                 //var h="500px";
                 //var s="resizable:no;help:no;status:no;scroll:yes";
				 //openWin(url,n,w,h,s);
				 window.location.href=url;
           }
           
           function musicDetailHou(musicId)
           {
                 var url="<%=path %>/musicDetailHou.action?musicId="+musicId;
                 var n="";
                 var w="480px";
                 var h="500px";
                 var s="resizable:no;help:no;status:no;scroll:yes";
				 openWin(url,n,w,h,s);
           }
       </script>
	</head>

	<body leftmargin="2" topmargin="2" background='<%=path %>/images/allbg.gif'>
			<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
				<tr bgcolor="#E7E7E7">
					<td height="14" colspan="7" background="<%=path %>/images/tbg.gif">&nbsp;歌曲&nbsp;</td>
				</tr>
				<tr align="center" bgcolor="#FAFAF1" height="22">
					<td width="10%">类别</td>
					<td width="20%">歌曲名</td>
					<td width="10%">演唱者</td>
					<td width="10%">所属专辑</td>
					<td width="10%">标签</td>
					<td width="10%">VIP专属</td>
					
					<td width="20%">操作</td>
		        </tr>
		           <c:forEach items="${musicList}" var="music">	
				 
				<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
					<td bgcolor="#FFFFFF" align="center">
						${music.catelogname}
					</td>
					<td bgcolor="#FFFFFF" align="center">
						${music.musictitle} 
					</td>
					<td bgcolor="#FFFFFF" align="center">
						${music.musicuser}   
					</td>
					 <td bgcolor="#FFFFFF" align="center">
						 ${music.zj.name}
					</td>
					
					 <td bgcolor="#FFFFFF" align="center">
						${music.biaoqian}  
					</td>
					
				    <td bgcolor="#FFFFFF" align="center">
						 <c:if test="${music.fufei==1}">
						     免费
						 </c:if>
						 
						  <c:if test="${music.fufei==2}">
						   付费
						 </c:if>
					</td>
					
					
					<td bgcolor="#FFFFFF" align="center">
					    <a href="musicEdit.action?musicId=${music.musicid}"   class="pn-loperator">修改</a>
					    &nbsp;
					    <c:if test="${music.fufei==1}">
						<a href="#" onclick="musicVip(${music.musicid})" class="pn-loperator">付费</a>
						</c:if>
						
						 <c:if test="${music.fufei==2}">
						<a href="#" onclick="musicCancelVip(${music.musicid})" class="pn-loperator">取消付费</a>
						</c:if>
						
						  &nbsp;
						<a href="#" onclick="musicDel(${music.musicid})" class="pn-loperator">删除</a>
					</td>
				</tr>
				</c:forEach>
			</table>
			
			<table width='98%'  border='0'style="margin-top:8px;margin-left: 5px;">
			  <tr>
			    <td>
			      <input type="button" value="添加" style="width: 80px;" onclick="musicAdd()" />
			    </td>
			  </tr>
		    </table>
	</body>
</html>
